CC = C:\MinGW\bin\mingw32-g++.exe
CFLAGS = -O2

# If necessary, change the following line to match the OpenGL libraries on your system
# e.g. -lGL -lGLU -lglut
# Try to get hardware-accellerated OpenGL drivers (e.g. Mesa DRI drivers) for good performance
OPENGLFLAGS = -lglut32 -lopengl32 -lglu32

IFILES = EdCoor3f.h axis.h basicrender.h interface.h keyboardmacros.h vectormath.h
OFILES = axis.o Tarantula.o move.o interface.o 


$(OFILES): $(IFILES)

interface.o: interface.cpp
	$(CC) $(CFLAGS) -fPIC -c $<

.cpp.o:
	$(CC) $(CFLAGS) -c $<
       
# You can change the following line to Tarantula.so or a versioned .so, 
#  but there must be a file or link called Tarantula.dll in <SPYDERDIR>/Tarantula
OUTPUT = Tarantula.dll

$(OUTPUT): $(OFILES)
	$(CC) $(CFLAGS) -shared -o $@ $(OFILES) $(OPENGLFLAGS)

#Use "make Tarantulatest" to compile to an executable instead of a shared library
#You should see a Tarantula screen appearing with a multi-colored box in it
Tarantulatest: $(OFILES) testexe.o
	$(CC) $(CFLAGS) -o $@ $(OFILES) testexe.o -lglut

clean: 
	rm -f $(OFILES) $(OUTPUT) testexe.o Tarantulatest	
         